package com.gongpingjialoan.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.gongpingjialoan.R;
import com.gongpingjialoan.activity.main.ValueReportActivity;
import com.gongpingjialoan.utility.DhUtil;

/**
 * Created by Administrator on 2016/11/17.
 */
public class DomainSelectDialog extends Dialog implements View.OnClickListener {

    private TextView domainTextView , privateTextView;

    private int padding;

    private ValueReportActivity mWebActivity;

    public DomainSelectDialog(Context context) {
        super(context, R.style.dialogs);
        padding = DhUtil.dip2px(context, 30);
        mWebActivity = (ValueReportActivity) context;
    }

    @Override
    public void onClick(View v) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.domain_select_layout);
        Window win = getWindow();
        win.getDecorView().setPadding(padding, 0, padding, 0);
        WindowManager.LayoutParams lp = win.getAttributes();
        lp.width = WindowManager.LayoutParams.MATCH_PARENT;
        lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
        win.setAttributes(lp);
        domainTextView = (TextView) findViewById(R.id.domain);
        privateTextView = (TextView) findViewById(R.id.private_id);
        domainTextView.setOnClickListener(this);
        privateTextView.setOnClickListener(this);
    }
}
